package Day1Zuoye;

import java.util.Scanner;

public class Testvisitor {
    public static void main(String[] args) {
        Visitor v=new Visitor();
        Scanner in=new Scanner(System.in);
        while(!"n".equals(v.name)){
        System.out.println("请输入名字(输入n将退出程序)");
        v.name=in.next();
        System.out.println("请输入年龄");
        v.age=in.nextInt();
        v.show();
    }
        System.out.println("退出程序");
}
}
